package com.dingwen.treasure.business.model.dto;

import com.dingwen.treasure.base.annotation.AllowableValues;
import com.dingwen.treasure.base.annotation.BanValues;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 　CheckDto
 * 　@author dingwen
 * 　@date 2022/6/27
 */
@ApiModel(value = "CheckDto", description = "自定义注解可选值数据传输对象")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Accessors(chain = true)
public class CheckDto implements Serializable {

    private static final long serialVersionUID = 7882637555731333608L;


    /**
     * int
     */
    @ApiModelProperty(value = "int")
    @NotNull(message = "intValue 不能为空")
    @AllowableValues(intValues = {1,2,3})
    private Integer intValue;


    /**
     * string
     */
    @ApiModelProperty(value = "string")
    @NotNull(message = "strValue 不能为空")
    @AllowableValues(strValues = {"a","b"},message = "strValue不在合法范围")
    private String strValue;


    @NotNull(message = "禁止值不能为空")
    @BanValues(banValues = {"*"})
    private String banValue;
}
